package com.concurrent.schedule;

import com.concurrent.domain.SpringScheduledCron;
import com.concurrent.domain.SpringScheduledCronExample;
import com.concurrent.mapper.SpringScheduledCronMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by zhangjiawen on 2019/10/30.
 */
@Service
public class SpringScheduledCronRepository {
    @Resource
    private SpringScheduledCronMapper springScheduledCronMapper;

    public int deleteByPrimaryKey(Integer cronId) {
        return 0;
    }
    public List<SpringScheduledCron> findAll() {
        return springScheduledCronMapper.selectAll();
    }
    public SpringScheduledCron findByCronId(Integer id) {
        return springScheduledCronMapper.selectByPrimaryKey(id);
    }
    public SpringScheduledCron findByCronKey(String cronKey) {
        return springScheduledCronMapper.selectByCron_key(cronKey);
    }
}
